package com.jinghao.tws.controller;

import java.util.Map;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.ModelAttribute;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.ResponseBody;

import com.jinghao.core.common.controller.JingHaoBaseController;
import com.jinghao.tws.service.IWvAutoUploadCloudConfigService;
import com.jinghao.tws.entity.WvAutoUploadCloudConfig;
import com.jinghao.tws.entity.WvAutoVedioConfig;

@Controller
@Scope("prototype")
@RequestMapping(value = "/app/tws/WvAutoUploadCloudConfig")
public class WvAutoUploadCloudConfigController extends JingHaoBaseController<WvAutoUploadCloudConfig> {
	//==================定制内容开始======================
//在这里修改代码
	
	/**
	 * 根据流程查询需要数据自动上传云端配置信息
	 * @param  
	 */
	@ResponseBody
	@RequestMapping(value = "/listWvAutoUploadCloudConfig",method = RequestMethod.GET) 
	public Map<String, Object> listWvAutoUploadCloudConfig(@ModelAttribute("model") WvAutoUploadCloudConfig model){
		this.getWvAutoUploadCloudConfigService().listWvAutoUploadCloudConfig(model);
        return model.getSingleJson();   
	} 
	/**
	 * 根据流程查询需要数据自动上传云端配置信息
	 * @param  
	 */
	@ResponseBody
	@RequestMapping(value = "/addWvAutoUploadCloudConfig",method = RequestMethod.POST) 
	public Map<String, Object> addWvAutoUploadCloudConfig(@ModelAttribute("model") WvAutoUploadCloudConfig model){
		this.getWvAutoUploadCloudConfigService().addWvAutoUploadCloudConfig(model);
        return model.getJson();   
	} 
	//==================定制内容结束======================

	@Autowired
	public void setWvAutoUploadCloudConfigService(IWvAutoUploadCloudConfigService wvAutoUploadCloudConfigService) {
		super.setIJingHaoBaseService(wvAutoUploadCloudConfigService);
	}

	public IWvAutoUploadCloudConfigService getWvAutoUploadCloudConfigService() {
		return (IWvAutoUploadCloudConfigService) super.getIJingHaoBaseService();
	}
}
